package com.qfedu.tantu.controller;

import com.qfedu.tantu.service.intf.SmsCodeService;
import com.qfedu.tantu.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


@RestController
@RequestMapping("/api/sms/")
@Api("短信验证码操作")
@CrossOrigin
public class SmsController {
    @Resource
    private SmsCodeService service;
    @ApiOperation("短信登陆")
    @GetMapping("sendlogin.do")
    public R smsLogin(String phone){
        return service.smsLogin(phone);
    }
    @ApiOperation("短信改密")
    @GetMapping("sendfind.do")
    public R smsUptPass(String phone){
        return service.smsUptPass(phone);
    }
    //发送注册验证码
    @ApiOperation(value = "发送注册验证码")
    @GetMapping("sendregister.do")
    public R send(String phone){
        return service.registerCode(phone);
    }
}
